
package ch.hearc.coursJava.kitBase.exerciceTri.hash;

import static org.junit.Assert.assertTrue;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class PersonneTest
	{

	/*------------------------------------------------------------------*\
	 |*							Constructeurs							*|
	 \*------------------------------------------------------------------*/

	@Before
	public void before()
		{
		// rien
		}

	@After
	public void after()
		{
		// rien
		}

	/*------------------------------------------------------------------*\
	 |*							Methodes Public							*|
	 \*-----------------------------------------------------------------*/

	@Test
	public void testCompareToEgal()
		{
		Personne personne1 = new Personne("A", 10);
		Personne personne2 = new Personne("A", 10);
		int resultExperimental = personne1.compareTo(personne2);
		int resultTheorique = 0;
		assertTrue(resultTheorique == resultExperimental);
		}

	@Test
	public void testCompareToPlusPetit()
		{
		Personne personne1 = new Personne("A", 10);
		Personne personne2 = new Personne("A", 9);
		int resultExperimental = personne1.compareTo(personne2);
		int resultTheorique = 1;
		assertTrue(resultTheorique == resultExperimental);
		}

	@Test
	public void testCompareToPlusGrand()
		{
		Personne personne1 = new Personne("A", 10);
		Personne personne2 = new Personne("B", 8);
		int resultExperimental = personne1.compareTo(personne2);
		int resultTheorique = -1;
		assertTrue(resultTheorique == resultExperimental);
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	}
